package com.twu.biblioteca;


public class Book {

    private String id;
    private String name;
    private String author;
    private String page_num;
    private String owner;

    public Book(String bookinfo){
        String [] strarray = bookinfo.split(",");
        id = strarray[0];
        name = strarray[1];
        page_num = strarray[2];
        author = strarray[3];
        owner = "";
    }

    public static void display_head()
    {
        System.out.println("Id"+"\t"+"Name"+"\t\t\t"+"PNum"+"\t"+"Author");
    }
    public void display()
    {
        System.out.println(id+"\t"+name+"\t"+page_num+"\t\t"+author);
    }
    public String getId()
    {
        return id;
    }
    public boolean hasOwner()
    {
        return !owner.isEmpty();
    }
    public void setOwner(String user)
    {
        owner = user;
    }
}

